<?php
namespace Users\Register\Helper;

use Users\Helper\SmartRedirect;
/**
 *
 * @author kosh
 *        
 * @uses \Pinenut\Action
 *      
 */
trait AfterRegister {

	function afterRegister( ) {
		$url = '/';
		
		$smartRedirectUrl = SmartRedirect::getRedirectPoint();
		if ($smartRedirectUrl !== null) {
			$url = $smartRedirectUrl;
			SmartRedirect::clearRedirectPoint();
		}
		
		$this->redirect($url);
	}
}